
//test for council room card

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

#define DEBUG 0
#define NOISY_TEST 1

int main () {

  int r;
  int seed = 1000;
  int numPlayer = 2;
  int pos = 1;
  int k[10] = {adventurer, council_room, feast, gardens, mine,
               remodel, smithy, village, baron, great_hall};
  int bonus = 0;
  struct gameState G;
  int s;
  
  r = initializeGame(numPlayer, k, seed, &G);

 
  puts("\n\n********* TESTING COUNCIL ROOM ************\n");
  

  printf ("initializeGame(%d, k, 1, &G) = %d\n", numPlayer, r);
  assert(r == 0);
  
  int count = numHandCards(&G);
  int buys = G.numBuys;
  
#if (NOISY_TEST == 1)
  printf("player: %d\n", whoseTurn(&G) );
  printf("count before: %d\n", count );
  printf("buys before: %d\n", buys );
#endif

  s = cardEffect(council_room,0,0,0,&G,pos,&bonus);
  assert(s == 0);
  
#if (NOISY_TEST == 1)
  printf("count after: %d\n", numHandCards(&G) );
  printf("buys after: %d\n", G.numBuys );
#endif

  assert(numHandCards(&G) == count + 3);
  assert(G.numBuys == buys + 1);


  printf("council_room card: PASS\n");

  return 0;
}